<template>
	<view class="orderListWrapper">
		<view class="title">店铺员工绑定列表</view>
		<view class="listWrapper">
			<view v-for="item in dataList" class="item">
				<!-- <image class="item-icon"></image> -->
				<view class="item-header">
					<view class="item-title">姓名:{{item.Nickname}}</view>
					<view class="item-time">电话：{{item.Phone}}</view>
				</view>
				
				<view class="item-bottom-button">
					<!-- <view class="item-bottom-video">查看视频</view> -->
					<!-- <view class="item-bottom-tiaokuan" v-on:click="onTiaoKuan"></view> -->
				</view>
			</view>
		</view>
		<view class="bottom btn" @click="bindstaff">添加绑定员工</view>
	</view>
</template>

<script>
	import http from '../../common/http.js';
	import common from '../../common/common.js';
	
	export default {
		data() {
			return {
				lastid:0,
				noMore:false,
				isLoadingMore:false,
				dataList:[],
				storeid:""
			}
		},
		onLoad(options) {
			this.storeid = options.storeid
			this.refreshData()
		},
		onPullDownRefresh() {
			this.isLoadingMore = false
			this.lastid = 0
			//this.refreshData()
		},
	
		methods: {
			refreshData(){
				var self = this
				var param={}
				param.storeid=self.storeid
				http.get("/store/staffbindlist", param, (res)=>{
					//console.log(res)
					if (res==null){
						self.dataList=[]
						return
					}
					self.dataList=res
					//console.log(self.dataList)
					
				})
			},
			onTiaoKuan() {
				common.showKefu()
			},
			bindstaff(){
				uni.navigateTo({
					url:"../allstaff/allstaff?storeid="+this.storeid
				})
			}
		}
	}
</script>

<style>
	.shifu {
		color: #333333;
		font-size: 14px;
	}
	.item-header {
		display: flex;
		justify-content: space-between;
		border-bottom: 1px solid #f6f6f6;
		height: 30px;
		line-height: 25px;
	}
	.consumWrapper {
		background-color: #f6f6f6;
		height: 100%;
	}
	.listWrapper {
		background-color: #f6f6f6;
	}
	.item {
		padding: 10px 10px;
		box-sizing: border-box;
		background-color: white;
		margin-bottom: 10px;
	}
	.item-title {
		font-size: 14px;
		color: #333333;
		font-weight: 500;
	}
	.shopItem {
		height: 50px;
		position: relative;
		/* border-bottom: 1rpx solid #f3f3f2; */
		padding: 5px 0px;
		box-sizing: border-box;
	}
	.shop-icon {
		width: 40px;
		height: 40px;
		background-color: red;
		position: absolute;
		left: 0px;
	}
	.shop-title {
		top: 5px;
		position: absolute;
		max-lines: 2;
		width: 60%;
		color: #8B8B8B;
		font-size: 14px;
		/* font-weight: 300; */
		
	}
	.shop-price {
		top: 5px;
		position: absolute;
		right: 0px;
		height: 20px;
		line-height: 20px;
		font-size: 16px;
	}
	.shop-nums {
		position: absolute;
		top: 25px;
		right: 0px;
		font-size: 12px;
		color: #999999;
	}
	.item-bottom {
		/* border-bottom: 1rpx solid #f3f3f2; */
		/* border-top: 1rpx solid #f3f3f2; */
		font-size: 16px;
		color: red;
		text-align: right;
		height: 30px;
		line-height: 36px; 
		display: flex;
		flex-direction: row-reverse;
		/* justify-content: space-between; */
		height: 40px;
	}
	.item-bottom-button {
		font-size: 16px;
		color: red;
		text-align: right;
		height: 30px;
		line-height: 36px; 
		display: flex;
		flex-direction: row-reverse;
		align-items: center;
		height: 40px;
	}
	.item-time {
		color: #666666;
		font-size: 12px;
	}
	.storename {
		color: #222222;
		height: 30px;
		line-height: 30px;
		font-size: 14px;
	}
	.item-bottom-video, .item-bottom-tiaokuan {
		background-color: #007AFF;
		color: white;
		font-size: 15px;
		line-height: 20px;
		padding: 5px 10px;
		border-radius: 10px;
		margin-left: 15px;
	}
	.title{
		line-height: 96rpx;
		text-align: center;
	}
	.bottom{
		position: absolute;
		width: 100%;
		height: 96rpx;
		bottom: 0;
	}
	.btn{
		background-color: #007AFF;
		color: #fff;
		line-height: 96rpx;
		text-align: center;
	}
</style>
